package net.xujialiang.XTestRPA.Repository.RPA;

import net.xujialiang.XTestRPA.Entity.Env.XRPAEnvTag;
import net.xujialiang.XTestRPA.Entity.RPA.XRPATag;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

public interface RPATagRepository extends CrudRepository<XRPATag, Integer> {
    Page<XRPATag> findAllByTtc(String ttc, Pageable pageable);
    @Query("SELECT c FROM XRPATag c WHERE c.ttc = :ttc and (:tagName is null or c.tagName = :tagName)")
    Page<XRPATag> findAllByTtcAndTagName(String ttc, String tagName, Pageable pageable);
}
